<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="">
			<h3>工作经验</h3>
			<div id="" style="display: flex; justify-content: right;">
				<button type="button" onclick="doAddWork()">添加工作经历</button>&nbsp;
				<button type="button" onclick="doBack()">撤消删除</button>&nbsp;
			</div>
			<hr >		
			<div id="div1"></div>			
		</div>
	</body>
	<script type="text/javascript">
		var oldDiv ;
		function doDelWork(event)
		{
			var delTraget = event.target.parentElement;
			var divObj = document.getElementById('div1')
			oldDiv = delTraget;
			divObj.removeChild(delTraget);
		}
		function doAddWork()
		{
			var divObj = document.getElementById('div1');
			var newdiv = document.createElement('div');
			newdiv.innerHTML = 
				`公司名称：<input type="" name="" id="" value="" />
				职位：<input type="" name="" id="" value="" />
				<a href="#" onclick = "doDelWork(event)">删除工作经历</a>
				<br><br>
				<div id="" style="display:flex; align-items:center;">
					工作职责及工作内容描述:<textarea rows="8" cols="100"></textarea>
				</div>
				<hr >`;
			divObj.appendChild(newdiv);
		}
		function doBack()
		{
			var divObj = document.getElementById('div1');
			divObj.appendChild(oldDiv);
		}
		function doStyleChange()
		{
			
		}
		onload = function(){
			doAddWork();
		}
	</script>
</html>
